package com.mysqlpass.update.model;

import java.util.Date;

/**
 * 更新信息实体类，用于表示应用程序的更新信息
 */
public class UpdateInfo {
    
    // 当前版本
    private String currentVersion;
    
    // 最新版本
    private String latestVersion;
    
    // 是否需要更新
    private boolean needUpdate;
    
    // 更新描述
    private String updateDescription;
    
    // 更新文件下载链接
    private String downloadUrl;
    
    // 更新发布日期
    private Date releaseDate;
    
    // 构造函数
    public UpdateInfo() {
    }
    
    // 带参数的构造函数
    public UpdateInfo(String currentVersion, String latestVersion, boolean needUpdate) {
        this.currentVersion = currentVersion;
        this.latestVersion = latestVersion;
        this.needUpdate = needUpdate;
    }

    // Getters and Setters
    public String getCurrentVersion() {
        return currentVersion;
    }

    public void setCurrentVersion(String currentVersion) {
        this.currentVersion = currentVersion;
    }

    public String getLatestVersion() {
        return latestVersion;
    }

    public void setLatestVersion(String latestVersion) {
        this.latestVersion = latestVersion;
    }

    public boolean isNeedUpdate() {
        return needUpdate;
    }

    public void setNeedUpdate(boolean needUpdate) {
        this.needUpdate = needUpdate;
    }

    public String getUpdateDescription() {
        return updateDescription;
    }

    public void setUpdateDescription(String updateDescription) {
        this.updateDescription = updateDescription;
    }

    public String getDownloadUrl() {
        return downloadUrl;
    }

    public void setDownloadUrl(String downloadUrl) {
        this.downloadUrl = downloadUrl;
    }

    public Date getReleaseDate() {
        return releaseDate;
    }

    public void setReleaseDate(Date releaseDate) {
        this.releaseDate = releaseDate;
    }
    
    @Override
    public String toString() {
        return "UpdateInfo{" +
                "currentVersion='" + currentVersion + '\'' +
                ", latestVersion='" + latestVersion + '\'' +
                ", needUpdate=" + needUpdate +
                ", updateDescription='" + updateDescription + '\'' +
                ", downloadUrl='" + downloadUrl + '\'' +
                ", releaseDate=" + releaseDate +
                '}';
    }
}